package biz.datalk.industrialland.admin.config.properties;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.io.Serializable;

/**
 * @author tarofang@163.com
 * @date 2024-01-15
 */
@Slf4j
@Getter
@Setter
@ToString
@ConfigurationProperties(SmsProperties.PREFIX)
public class SmsProperties {
    public static final String PREFIX = "datalk-sms";

    private SmsType type = SmsType.A_LI_YUN;

    private Aliyun aliyun;


    public enum SmsType {
        /** 阿里云 */
        A_LI_YUN,
        /** 腾讯 */
        TENCENT;
    }

    @Getter
    @Setter
    @ToString
    public static class Aliyun implements Serializable {
        private static final long serialVersionUID = 1L;

        String accessKeyId;
        String accessSecret;
        String signName;

        /**
         * 短息验证码模版
         * 验证码${code}，您正在登录，若非本人操作，请勿泄露。
         */
        String templateCode;

    }
}
